/* Lac Viet ERP                                                
 * Copyright (c) 2013 Lac Viet                                 
 * http://www.lacviet.com.vn                                   
 *=============================================================
 * File name            : SR_tblSalesOrders.cs         
 * Created by           : Auto - 04/23/2014 15:03:45                     
 * Last modify          : Auto - 04/23/2014 15:03:45                     
 * Version              : 1.0                                  
 * ============================================================
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace LineOfBusiness.Poco
{
	[Serializable]
	public partial class SR_tblSalesOrders : BaseEntity
	{
		public SR_tblSalesOrders()
		{
            this.Approved = false;
		}

	    #region Properties

		private string _SONo;

        [Key]
		[RegularExpression(@"[a-zA-Z0-9_-]*")]
		[Required]
        [MaxLength(20)]
        public string SONo 
		{ 
			get
			{
                return _SONo;
			}
			set 
			{ 
                _SONo = value;
			} 
		}

		private DateTime? _SODate;
        public DateTime? SODate 
		{ 
			get
			{
                return _SODate;
			}
			set 
			{ 
                _SODate = value;
			} 
		}

		private string _SOStatus;
		[Required]
        [MaxLength(1)]
        public string SOStatus 
		{ 
			get
			{
                return _SOStatus;
			}
			set 
			{ 
                _SOStatus = value;
			} 
		}

		private string _CustomerID;
		[Required]
        [MaxLength(20)]
        public string CustomerID 
		{ 
			get
			{
                return _CustomerID;
			}
			set 
			{ 
                _CustomerID = value;
			} 
		}

		private string _CurrencyID;
		[Required]
        [MaxLength(20)]
        public string CurrencyID 
		{ 
			get
			{
                return _CurrencyID;
			}
			set 
			{ 
                _CurrencyID = value;
			} 
		}

		private string _ContractNo;
        [MaxLength(20)]
        public string ContractNo 
		{ 
			get
			{
                return _ContractNo;
			}
			set 
			{ 
                _ContractNo = value;
			} 
		}

		private DateTime? _Deadlines;
        public DateTime? Deadlines 
		{ 
			get
			{
                return _Deadlines;
			}
			set 
			{ 
                _Deadlines = value;
			} 
		}

		private bool? _Approved;
        public bool? Approved 
		{ 
			get
			{
                return _Approved;
			}
			set 
			{ 
                _Approved = value;
			} 
		}

		private DateTime? _ApprovedDate;
        public DateTime? ApprovedDate 
		{ 
			get
			{
                return _ApprovedDate;
			}
			set 
			{ 
                _ApprovedDate = value;
			} 
		}

		private string _UserApproved;
        [MaxLength(20)]
        public string UserApproved 
		{ 
			get
			{
                return _UserApproved;
			}
			set 
			{ 
                _UserApproved = value;
			} 
		}

		private DateTime? _CreatedDate;
        public DateTime? CreatedDate 
		{ 
			get
			{
                return _CreatedDate;
			}
			set 
			{ 
                _CreatedDate = value;
			} 
		}

		private string _UserID;
        [MaxLength(20)]
        public string UserID 
		{ 
			get
			{
                return _UserID;
			}
			set 
			{ 
                _UserID = value;
			} 
		}
		/// <summary>
        /// Column: SR_tblCustomers.CustomerID
        /// </summary>
		public SR_tblCustomers SR_tblCustomers { get;set; }

		/// <summary>
        /// Column: SR_tblAttachItem.SONo
        /// </summary>
		public ICollection<SR_tblAttachItem> SR_tblAttachItem { get;set; }

		/// <summary>
        /// Column: SR_tblSalesOrdersLines.SONo
        /// </summary>
		public ICollection<SR_tblSalesOrdersLines> SR_tblSalesOrdersLines { get;set; }


        #endregion
	}
}
